<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>OilTest</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
<link rel="start" href="index.html" title="Liboil Reference Manual">
<link rel="up" href="ch02.html" title="Liboil Unstable API">
<link rel="prev" href="liboil-liboilrandom.html" title="Random Number Generation">
<link rel="next" href="liboil-liboiltypes.html" title="liboiltypes">
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="ch01.html" title="Liboil Stable API">
<link rel="chapter" href="ch02.html" title="Liboil Unstable API">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="liboil-liboilrandom.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Liboil Reference Manual</th>
<td><a accesskey="n" href="liboil-liboiltypes.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2596138" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2661907" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="liboil-liboiltest"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2596138"></a><span class="refentrytitle">OilTest</span>
</h2>
<p>OilTest &#8212; Test and profile function implementations.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">



                    <a href="liboil-liboiltest.html#OilTest">OilTest</a>;
void                (<a href="liboil-liboiltest.html#OilTestFunction">*OilTestFunction</a>)                  (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test);
#define             <a href="liboil-liboiltest.html#OIL-TEST-HEADER:CAPS">OIL_TEST_HEADER</a>
#define             <a href="liboil-liboiltest.html#OIL-TEST-FOOTER:CAPS">OIL_TEST_FOOTER</a>
<a href="liboil-liboiltest.html#OilTest">OilTest</a>*            <a href="liboil-liboiltest.html#oil-test-new">oil_test_new</a>                        (<a href="liboil-liboilclass-unstable.html#OilFunctionClass">OilFunctionClass</a> *klass);
void                <a href="liboil-liboiltest.html#oil-test-init">oil_test_init</a>                       (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test);
void                <a href="liboil-liboiltest.html#oil-test-free">oil_test_free</a>                       (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test);
void                <a href="liboil-liboiltest.html#oil-test-set-iterations">oil_test_set_iterations</a>             (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test,
                                                         int iterations);
void                <a href="liboil-liboiltest.html#oil-test-check-ref">oil_test_check_ref</a>                  (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test);
int                 <a href="liboil-liboiltest.html#oil-test-check-impl">oil_test_check_impl</a>                 (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test,
                                                         <a href="liboil-liboilimpl-unstable.html#OilFunctionImpl">OilFunctionImpl</a> *impl);
void                <a href="liboil-liboiltest.html#oil-test-cleanup">oil_test_cleanup</a>                    (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test);
void*               <a href="liboil-liboiltest.html#oil-test-get-source-data">oil_test_get_source_data</a>            (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test,
                                                         <a href="liboil-liboiltypes.html#OilArgType">OilArgType</a> arg_type);
int                 <a href="liboil-liboiltest.html#oil-test-get-value">oil_test_get_value</a>                  (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test,
                                                         <a href="liboil-liboiltypes.html#OilArgType">OilArgType</a> arg_type);
void                <a href="liboil-liboiltest.html#oil-test-set-test-footer">oil_test_set_test_footer</a>            (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test,
                                                         <a href="liboil-liboilparameter.html#OilParameter">OilParameter</a> *p,
                                                         int test_footer);
void                <a href="liboil-liboiltest.html#oil-test-set-test-header">oil_test_set_test_header</a>            (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test,
                                                         <a href="liboil-liboilparameter.html#OilParameter">OilParameter</a> *p,
                                                         int test_header);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2661907"></a><h2>Description</h2>
<p>
</p>
<p>

</p>
</div>
<div class="refsect1" lang="en">
<a name="id2661926"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2661937"></a><h3>
<a name="OilTest"></a>OilTest</h3>
<a class="indexterm" name="id2661949"></a><pre class="programlisting">typedef struct {
} OilTest;
</pre>
<p>
An opaque structure describing how to test an OilFunctionImpl
for an OilFunctionClass.</p>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2661969"></a><h3>
<a name="OilTestFunction"></a>OilTestFunction ()</h3>
<a class="indexterm" name="id2661982"></a><pre class="programlisting">void                (*OilTestFunction)                  (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test);</pre>
<p>
Typedef for functions that initialize special values
in source arrays for a particular function class.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><span class="term"><em class="parameter"><code>test</code></em>&#160;:</span></td>
<td> the <em class="parameter"><code>OilTest</code></em> structure
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2662039"></a><h3>
<a name="OIL-TEST-HEADER:CAPS"></a>OIL_TEST_HEADER</h3>
<a class="indexterm" name="id2662051"></a><pre class="programlisting">#define OIL_TEST_HEADER 256
</pre>
<p>
Default number of bytes that are prepended to the array test area.</p>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2660712"></a><h3>
<a name="OIL-TEST-FOOTER:CAPS"></a>OIL_TEST_FOOTER</h3>
<a class="indexterm" name="id2660724"></a><pre class="programlisting">#define OIL_TEST_FOOTER 256
</pre>
<p>
Default number of bytes that are appended to the array test area.</p>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2660744"></a><h3>
<a name="oil-test-new"></a>oil_test_new ()</h3>
<a class="indexterm" name="id2660756"></a><pre class="programlisting"><a href="liboil-liboiltest.html#OilTest">OilTest</a>*            oil_test_new                        (<a href="liboil-liboilclass-unstable.html#OilFunctionClass">OilFunctionClass</a> *klass);</pre>
<p>
Creates a new OilTest for the OilFunctionClass represented by <em class="parameter"><code>klass</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>klass</code></em>&#160;:</span></td>
<td> an OilFunctionClass
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the new OilTest
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2660824"></a><h3>
<a name="oil-test-init"></a>oil_test_init ()</h3>
<a class="indexterm" name="id2660836"></a><pre class="programlisting">void                oil_test_init                       (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test);</pre>
<p>
Intializes <em class="parameter"><code>test</code></em>.
</p>
<p>
FIXME: needs work</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><span class="term"><em class="parameter"><code>test</code></em>&#160;:</span></td>
<td> the OilTest
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2660896"></a><h3>
<a name="oil-test-free"></a>oil_test_free ()</h3>
<a class="indexterm" name="id2660909"></a><pre class="programlisting">void                oil_test_free                       (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test);</pre>
<p>
Frees memory associated with <em class="parameter"><code>test</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><span class="term"><em class="parameter"><code>test</code></em>&#160;:</span></td>
<td> the OilTest
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2660964"></a><h3>
<a name="oil-test-set-iterations"></a>oil_test_set_iterations ()</h3>
<a class="indexterm" name="id2660976"></a><pre class="programlisting">void                oil_test_set_iterations             (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test,
                                                         int iterations);</pre>
<p>
Sets the number of iterations of <em class="parameter"><code>test</code></em> to <em class="parameter"><code>iterations</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>test</code></em>&#160;:</span></td>
<td> the OilTest
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>iterations</code></em>&#160;:</span></td>
<td> the number of iterations
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2585616"></a><h3>
<a name="oil-test-check-ref"></a>oil_test_check_ref ()</h3>
<a class="indexterm" name="id2585629"></a><pre class="programlisting">void                oil_test_check_ref                  (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test);</pre>
<p>
Runs the test specified by <em class="parameter"><code>test</code></em> on the reference function of the
class being tested.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><span class="term"><em class="parameter"><code>test</code></em>&#160;:</span></td>
<td> the OilTest
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2585685"></a><h3>
<a name="oil-test-check-impl"></a>oil_test_check_impl ()</h3>
<a class="indexterm" name="id2585697"></a><pre class="programlisting">int                 oil_test_check_impl                 (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test,
                                                         <a href="liboil-liboilimpl-unstable.html#OilFunctionImpl">OilFunctionImpl</a> *impl);</pre>
<p>
Runs the testing procedure described by <em class="parameter"><code>test</code></em> on the implementation
<em class="parameter"><code>impl</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>test</code></em>&#160;:</span></td>
<td> the OilTest
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>impl</code></em>&#160;:</span></td>
<td> an OilFunctionImpl
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> 1 if <em class="parameter"><code>impl</code></em> passes the test, 0 if it fails
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2585796"></a><h3>
<a name="oil-test-cleanup"></a>oil_test_cleanup ()</h3>
<a class="indexterm" name="id2585808"></a><pre class="programlisting">void                oil_test_cleanup                    (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test);</pre>
<p>
Cleans up <em class="parameter"><code>test</code></em>.
</p>
<p>
FIXME: needs work</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><span class="term"><em class="parameter"><code>test</code></em>&#160;:</span></td>
<td> the OilTest
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2585868"></a><h3>
<a name="oil-test-get-source-data"></a>oil_test_get_source_data ()</h3>
<a class="indexterm" name="id2585879"></a><pre class="programlisting">void*               oil_test_get_source_data            (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test,
                                                         <a href="liboil-liboiltypes.html#OilArgType">OilArgType</a> arg_type);</pre>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>test</code></em>&#160;:</span></td>
<td>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>arg_type</code></em>&#160;:</span></td>
<td>
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2585957"></a><h3>
<a name="oil-test-get-value"></a>oil_test_get_value ()</h3>
<a class="indexterm" name="id2662884"></a><pre class="programlisting">int                 oil_test_get_value                  (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test,
                                                         <a href="liboil-liboiltypes.html#OilArgType">OilArgType</a> arg_type);</pre>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>test</code></em>&#160;:</span></td>
<td>
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>arg_type</code></em>&#160;:</span></td>
<td>
</td>
</tr>
<tr>
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2662954"></a><h3>
<a name="oil-test-set-test-footer"></a>oil_test_set_test_footer ()</h3>
<a class="indexterm" name="id2662964"></a><pre class="programlisting">void                oil_test_set_test_footer            (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test,
                                                         <a href="liboil-liboilparameter.html#OilParameter">OilParameter</a> *p,
                                                         int test_footer);</pre>
<p>
Sets the number of bytes of guard footer for <em class="parameter"><code>p</code></em> to <em class="parameter"><code>test_footer</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>test</code></em>&#160;:</span></td>
<td> the OilTest
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>p</code></em>&#160;:</span></td>
<td> the OilParameter to change the footer for
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>test_footer</code></em>&#160;:</span></td>
<td> the number of bytes of guard footer
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2663058"></a><h3>
<a name="oil-test-set-test-header"></a>oil_test_set_test_header ()</h3>
<a class="indexterm" name="id2663068"></a><pre class="programlisting">void                oil_test_set_test_header            (<a href="liboil-liboiltest.html#OilTest">OilTest</a> *test,
                                                         <a href="liboil-liboilparameter.html#OilParameter">OilParameter</a> *p,
                                                         int test_header);</pre>
<p>
Sets the number of bytes of guard header for <em class="parameter"><code>p</code></em> to <em class="parameter"><code>test_header</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><span class="term"><em class="parameter"><code>test</code></em>&#160;:</span></td>
<td> the OilTest
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>p</code></em>&#160;:</span></td>
<td> the OilParameter to change the header for
</td>
</tr>
<tr>
<td><span class="term"><em class="parameter"><code>test_header</code></em>&#160;:</span></td>
<td> the number of bytes of guard header
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>
